import Vue from 'vue'
import Router from 'vue-router'
import Login from "@/components/Login";
import Home from "@/components/Home";
import UserEdit from "@/components/UserEdit";
import UserInsert from "@/components/UserInsert";

Vue.use(Router)

export default new Router({
  routes: [
    //登录模块
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    //主页面，登录成功后跳转到主页面
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    //员工编辑页面
    {
      path: '/userEdit/:id',
      name: 'UserEdit',
      component: UserEdit
    },
    //员工新增页面
    {
      path: '/userInsert',
      name: 'UserInsert',
      component: UserInsert
    },
  ]
})
